package testGroovy

def file = 'src/main/resources/proxy.txt' as File
		
if(file.exists()) {
	println '文件存在'
} else {
	println '文件不存在'
}
def map = [:]
file.eachLine { line ->
	 def ipAndPort = line.split('#')
	 map.putAt(ipAndPort[0],ipAndPort[1]);
}

def list = map.collect { entry ->
	[entry.key, entry.value]
}

println map.size()
println Math.round(Math.random() * 50) 

println list